package cn.milolab.djback.dao;

import cn.milolab.djback.bean.entity.Employee;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author milowang
 */
@Repository
public interface EmployeeDAO {

    /**
     * 使用userId获取社员实体
     *
     * @param userId 要查找的社员的userId
     * @return 社员实体
     */
    Employee getEmployeeByUserId(Integer userId);

    Employee getEmployeeBySerial(String stuSerial, String jobSerial);

    Integer updateUserId(Integer employeeId,Integer userId);

    Employee getEmployeeById(Integer id);

    List<Employee> getEmployee(String sort);

    Integer insertEmployee(Employee addEmployee);

    Integer updateEmployee(Employee updateEmployee);

    Integer deleteEmployeeById(Integer id);

    Employee getEmployeeByStuSerial(String stuSerial);

    Employee getEmployeeByJobSerial(String jobSerial);
}
